#include "NoDoc.h"

#include <string.h>
#include <fan-llvm/core/Core.h>
#include "Type.h"
#include "UnsupportedErr.h"


Type* NoDoc_classType = NULL;
VTable* NoDoc_classVTable = NULL;


/**********************************************
 *
 * Methods and fields
 *
 **********************************************/


/* NoDoc defVal */
NoDoc* NoDoc_defVal(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::NoDoc.defVal not implemented yet"));
}


/**********************************************
 *
 * Type-system functions
 *
 **********************************************/


Type* NoDoc_initType(void)
{
  if (NoDoc_classType == NULL)
  {
    Type* baseType = Obj_initType();
    VTable* vtable = NoDoc_initVTable();
    Type* type = Type_new("NoDoc", baseType, vtable, sizeof(NoDoc), sizeof(NoDocVTable));
    Type_registerFieldImplementation(type, "defVal", NoDoc_defVal, NULL);
    NoDoc_classType = type;
    NoDoc_initStatic();
  }
  return NoDoc_classType;
}


VTable* NoDoc_initVTable(void)
{
  if (NoDoc_classVTable == NULL)
  {
    VTable* vtable = memoryAlloc(sizeof(NoDocVTable));
    memcpy(vtable, Obj_initVTable(), sizeof(FanObjVTable));
    NoDoc_classVTable = vtable;
  }
  return NoDoc_classVTable;
}


void NoDoc_initStatic(void)
{
}
